﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace App.Store
{
    public partial class frmChooseTemplate : Form
    {

        private String type = null;
        public frmChooseTemplate()
        {
            InitializeComponent();
        }

        private void frmChooseTemplate_Load(object sender, EventArgs e)
        {
            DirectoryInfo directoryInfo = new DirectoryInfo(UW.Utility.Common.getExcelTempPath() + @"\仓库\" + this.type + @"\");
            FileInfo[] fileInfos = directoryInfo.GetFiles("*.xls");
            for (int i = 0; i < fileInfos.Length; i++)
            {
                this.cbTemplate.Items.Add(fileInfos[i].Name);
            }
            this.cbTemplate.SelectedIndex = 0;

            foreach (DataRow dr in this.DS.Tables[0].Rows)
            {
                if (dr["bSelect"].ToString() == "1")
                    this.strAllxID = this.strAllxID + dr["xID"].ToString() + ",";
            }
            this.strAllxID = this.strAllxID.Substring(0, this.strAllxID.Length - 1);
        }
    }
}
